package com.hsylient.javase.chapter10;

import org.junit.Test;

import java.text.NumberFormat;

/**
 * 测试NumberFormat
 */
public class MyNumberFormat {

    @Test
    public void testMethod() {
        NumberFormat currencyInstance = NumberFormat.getCurrencyInstance();
        NumberFormat percentInstance = NumberFormat.getPercentInstance();
        double s = 0.1;
        System.out.println(currencyInstance.format(s));
        System.out.println(percentInstance.format(s));
    }

}
